<?php
/**
 * View  LaFabbrica.org
 * 
 * @author     luigi.pastore (gigi@la-fabbrica.org)
 * @created    26-lug-2012
 * @package    LaFabbrica
 * @copyright  Copyright (c) 2011 Luigi Pastore
 */
?>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
    //<![CDATA[
    google.load("maps","3.8", {"other_params":"sensor=true"});
      
    $(document).ready(function()
    {
//        var rendererOptions = {
//            draggable: true
//        };
//        var container = $('div.map-frame').get(0);
//        
//        var directionsService = new google.maps.DirectionsService();
//        var directionsDisplay = new google.maps.DirectionsRenderer(rendererOptions);
//        var map;
//
//        
//        var chicago = new google.maps.LatLng(41.850033, -87.6500523);
//        var mapOptions = {
//            zoom:7,
//            mapTypeId: google.maps.MapTypeId.ROADMAP
//        }
//        map = new google.maps.Map(container, mapOptions);
//        directionsDisplay.setMap(map);
//        directionsDisplay.setPanel(document.getElementById("directionsPanel"));
//        
//        var start = 'via sebastiano serlio 25/2, Bologna, IT';
//        var end = 'Milano, IT';
//        var request = {
//            origin:start,
//            destination:end,
//            travelMode: google.maps.TravelMode.DRIVING
//        };
//        directionsService.route(request, function(result, status) {
//            if (status == google.maps.DirectionsStatus.OK) {
//                directionsDisplay.setDirections(result);
//            }
//        });

        $('tr[class^="tourbook-step"]').click(function(){
            $(this).siblings().removeClass('focused');
            $(this).toggleClass('focused');
        })  
    });

    //]]>
</script>
<div class="info">
    ...
</div>
<div id="content">
    <div id="summary" class="events">
        <div class="head">
            <h2>
                <?php echo $this->event_types[$this->data['event_type']]['event_type_name']; ?>
            </h2>
        </div>
        <div class="body">
            <table cellspacing="0" class="table">
                <tbody>
                    <tr>
                        <th>Titolo:</th>
                        <td>
                            <strong>
                                <?php echo $this->data['event_title'] ?>
                            </strong>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>

    <table cellspacing="0" class="table list" id="tourbook">
        <tbody>
            <tr class="tourbook-step">
                <td>
                    <div class="date">
                        <h3>
                            <b>13 Giu 2012</b>
                            <span>Mer</span>
                        </h3>
                    </div>
                    <div class="location">
                        Locomotiv, <strong>Bologna</strong> (BO)
                        <br/> +
                        <span>Nicodemo, Lenula</span>
                    </div>
                    <div class="live-status">
                        <span class="proposal">Proposta</span>
                    </div>
                    <span>
                        <a class="map" href="/admin/live/vedi/id/1"><img src="/images/admin/32x32/map.png"/></a>
                    </span>
                    <div class="tour-step">
                        Test
                    </div>
                </td>
            </tr>

            <tr class="break">
                <td colspan="5">&nbsp;</td>
            </tr>               
<!--            <tr>
                <td colspan="2">
                    <div class="map-frame">
                         Mappa 
                    </div>
                    <div id="directionsPanel" style="float:right;width:30%;height: 100%"></div>
                </td>
            </tr>-->
        </tbody>
    </table>

</div>